<div class="widgetcontent bordered shadowed nopadding">
	<form id="form_jadwal" class="stdform stdform2" method="POST" action="">
		<input type="hidden" id="id" name="id" value="<?php echo $id ?>" />
		<input type="hidden" id="id_tahun" name="id_tahun" value="<?php echo $id_tahun ?>" />
		<input type="hidden" id="id_kelas" name="id_kelas" value="<?php echo $id_kelas ?>" />
		<input type="hidden" id="id_hari" name="id_hari" value="<?php echo $id_hari ?>" />
		<p>
			<label for="hari">Hari</label>
			<span class="field">
                            <input type="text" disabled value="<?php echo $nama_hari ?>" />
			</span>
		</p>
		<p>
			<label for="id_kelas">Kelas</label>
			<span class="field">
                            <input type="text" disabled value="<?php echo $nama_kelas ?>" />
			</span>
		</p>
		<p>
			<label for="jam_pelajaran">Jam Pelajaran Ke-</label>
			<span class="field" id="wadah_jam_pelajaran">
			<select id="jam_pelajaran" name="jam_pelajaran" class="uniformselect"><option value="">Harap Pilih Kelas Terlebih Dahulu</option></select>
			</span>
		</p>
		<p>
			<label for="id_mapel">Mata Pelajaran</label>
			<span class="field" id="wadah_mapel">
                            <select id="id_mapel" name="id_mapel" class="uniformselect" disabled><option value="">Harap Pilih Jam Pelajaran Terlebih Dahulu</option></select>
			</span>
		</p>
		<p>
			<label for="id_ruangan">Ruangan</label>
			<span class="field" id="wadah_ruangan">
                            <select id="id_ruangan" name="id_ruangan" class="uniformselect" disabled><option value="">Harap Pilih Jam Pelajaran Terlebih Dahulu</option></select>
			</span>
		</p>
		
		<p class="stdformbutton">
                    <button class="btn btn-primary">Simpan</button> &nbsp; <input type="checkbox" name="lagi" value="1" id="lagi" <?php echo set_checkbox('lagi', '1', TRUE) ?> /><label style="margin: 0;
padding: 0;
clear: both;
float: none;
font-weight: 100;
width: auto;
vertical-align: middle;
text-align: center;" for="lagi">Tambah Mata Pelajaran lagi untuk Kelas <?php echo $nama_kelas ?> di hari <?php echo $nama_hari; ?></label>
		</p>
	</form>
</div>
<?php echo validation_errors(); ?>
<script>
jQuery(document).ready(function() {
	jQuery('#id_kelas').change(function(eve) {
		eve.preventDefault();

		jQuery.ajax({
			url: "<?php echo site_url("admin/jadwal/kelas") ?>",
			type: "POST",
			dataType: "html",
			data: {'id_tahun' : jQuery('#id_tahun').val(),
				'id_kelas' : jQuery('#id_kelas').val(),
				'hari' : jQuery('#id_hari').val()},
			error: function()
			{
				alert('Terjadi Kesalahan. Harap Cek Koneksi Anda');
			},
			success: function(html) {
				jQuery('#wadah_jam_pelajaran').html(html);
			}
		});
	});
        jQuery('#id_kelas').change();
});
</script>